<%-- 
    Document   : form terima barang
    Created on : Nov 21, 2013, 9:03:55 AM
    Author     : admin
--%>

<%@page import="java.util.logging.Logger"%>
<%@page import="java.util.logging.Level"%>
<%@page import="bean.Pemesanan"%>
<%@page import="bean.BarangGudang"%>
<%@page import="oracle.net.aso.C00"%>
<%@page import="bean.Penerimaan"%>
<%@page import="java.sql.SQLException"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Statement"%>
<%@page import="oracle.jdbc.pool.OracleDataSource"%>
<%@page import="java.sql.Connection"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body bgcolor="blue">


            <table border="0" align="center">
                <th colspan="2"rowspan="1" width="1%" bgcolor="red" >
                    <font color="white"
                          <h1 align="center" style="color:#00CCFF"> Rekayasa Perangkat Lunak Berorientasi Proses </h1>
                        <h2 align="center" style="color:#00CCFF"> Sistem Informasi Gudang Alfamart </h2>
                        <h3 align="center" style="color:#00CCFF"> Kelompok ES CAMPUR </h3>
                    </font>

            </table>
             <br>
        <br>
        <br>
            <font style="font-size: 18px ; font-family: 'Jokerman'"><center>FORM TERIMA BARANG</center></font><br>
            <table border="1" align="center" width="400" height="100">
                <tr>
                    <td align="center">NO.</td>
                    <td align="center">KODE PEMESANAN</td>
                    <td align="center">JUMLAH BARANG</td>
                    <td align="center">ID BARANG</td>
                    <td align="center">PEMESAN</td>
                </tr>
                <br>

                <%
                            Connection connection = null;
                            OracleDataSource ds;
                          
                                ds = new OracleDataSource();
                                ds.setURL("jdbc:oracle:thin:@172.23.9.185:1521:orcl");
                                ds.setPassword("mhs115314034");
                                ds.setUser("mhs115314034");

                                connection = ds.getConnection();

                                Statement statement = connection.createStatement();
                                statement.executeQuery("select * from pemesananbarang order by kodepemesanan");
                                //                System.out.println("data berhasil diinputkan");
                           

                            Penerimaan terima = new Penerimaan();
                            ResultSet resultSet = terima.tampilBarang();
                            int counter = 1;
                            while (resultSet.next()) {
                                out.print("<tr>");
                                out.print("<td align='center'>" + (counter) + "</td>");
                                out.print("<td align='center'>" + resultSet.getString("kodepemesanan") + "</td>");
                                out.print("<td align='center'>" + resultSet.getString("jumlahbarang") + "</td>");
                                out.print("<td align='center'>" + resultSet.getString("idbarang") + "</td>");
                                out.print("<td align='center'>" + resultSet.getString("username") + "</td>");


                                out.print("</tr>");
                                counter++;
                            }
                %>
                
                 <table border="0" align="center" width="220">
                <tr>
                    <td align="center">
                        <form action="TandaTerima">
                            <input type="submit" value="CONFIRM" name="confirm" style="font-size: 12px"></form>

                    </td>

                </tr>
            </table>
        </form>
        <table border="0" align="center" width="220"> 
            <tr>
                <td align="center" width="50%"><form action="form_utama_gudang.jsp"><input type="submit" value="KEMBALI" name="kembali" style="font-size: 12px"></form></td>
            </tr>
        </table>
    </body>
</html>